#!/user/local/python/bin/python
# coding=utf-8
# _author_ = 'SJC'

from pandas._libs import json

'''
read json
'''

dir = 'F:\\Sjc\\code\\myStudentCode\\Python\\src\\main\\java\\data\\a.json'


def analysisJson(path):
    result = {}
    jsonCheckData = open(path, encoding='utf-8')
    # jsonUtil
    resultCheckJson = getStringToJson(jsonCheckData.read())
    for key, value in resultCheckJson.items():
        result[key] = value
    return result


def getStringToJson(jsonString):
    # jsonDate = open(filePath,'r').read().strip()
    resultJson = json.loads(jsonString)
    return resultJson


analysis_json = analysisJson(dir)


def main():
    _cleanRuleList = analysis_json['cleanRuleList']

    for clean in _cleanRuleList:
        code = clean['ruleCode']
        print(code)


if __name__ == '__main__':
    main()
